package com.rd.student.ruanjian.class3.gaochenxi.day0727;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;

public class Fader {
   public static void main(String[] args) {
      BufferedReader br = null;
      try {
         br = new BufferedReader(new FileReader("yuan.txt"));
         String line = null;
         while (true) {
            line = br.readLine();//逐行读取数据
            if (line == null) {//如果没有元素，就break
               break;
            }
            System.out.println(line);//打印每一行的元素
         }
      } catch (IOException e) {
         throw new RuntimeException(e);
      } finally {
         if (br != null) {
            try {
               br.close();
            } catch (IOException e) {
               throw new RuntimeException(e);
            }
         }
      }
   }
}
